import http from '../http'

//获取数据
export const bumenApi=(page)=>
http({
    url:"/department/selectByPage",
    method:"POST",
    data:{
        page
    }
});

//获取总数据
export const currentCountApi=()=>
http({
    url:"/department/getDepartmentList",
    method:"POST",
});


//删除数据
export const delbumenApi=(id)=>
http({
    url:"/department/delete",
    method:"POST",
    params:{
        id
    }
})
//添加
export const addbumenApi=(obj)=>
http({
    url:"/department/add",
    method:"POST",
    data: obj
})

//编辑
export const editbumenApi=(data)=>
http({
    url:"/department/update",
    method:"POST",
    data
})

//改变状态
export const isUsedStateApi=(id,isUsed)=>
http({
    url:"/department/updateIsUsed",
    method:"POST",
    data:{
        id,
        isUsed
    }
})